﻿<div class="alerts">
    @foreach (Alert alert in TempData["Alerts"] as AlertsContainer)
    {
        <div class="alert alert-@alert.Type.ToString().ToLowerInvariant()" data-timeout="@alert.Timeout">
            <span>@alert.Message</span><span class="close">×</span>
        </div>
    }
    @foreach (String message in ViewData.ModelState.SelectMany(state => state.Value.Errors).Select(error => error.ErrorMessage))
    {
        <div class="alert alert-danger">
            <span>@message</span><span class="close">×</span>
        </div>
    }
</div>
